<?php
App::uses('CakeEmail', 'Network/Email');
class IntroController extends AppController{
    public function index()
    {
        $lang_code = $this->Session->read('lang_code');
        $this->loadModel('Menu'); $this->Menu->lang_code = $lang_code;
        $this->loadModel('Media'); $this->Media->lang_code = $lang_code;
        $this->loadModel('Category'); $this->Category->lang_code = $lang_code;
        
        $intro_menu = $this->Menu->get_menu_by_code('intro_menu');
        $this->set('intro_menu', $intro_menu);
        
        $category_id = $this->Category->get_category_id_by_code('slider_intro');
        $slider_intro = $this->Media->get_media_by_category_id($category_id);
        $this->set('slider_intro', $slider_intro);
    }
    
    public function test()
    {
        
    }

}